package com.d.common.config.mybatis;


import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * Created by
 */
@Aspect
@Component
public class DataSourceAop {
    @Before("execution(* com.d.business.dao.*.*(..))")
    public void setOldErpSourceType() {
        DataSourceContextHolder.user();
    }

    @After("execution(* com.d.business.dao.*.*(..))")
    public void userAfter() {
        DataSourceContextHolder.user();
    }
}
